package com.h3c.nem.mapstruct;

import com.h3c.nem.dto.AttachmentFileInfo;
import com.h3c.nem.dto.TbOfferAttachmentDTO;
import com.h3c.nem.dto.TbOfferFamilyDTO;
import com.h3c.nem.entity.TbOfferAttachment;
import com.h3c.nem.entity.TbOfferFamily;
import com.h3c.nem.vo.TbOfferAttachmentVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author chenyifan
 * @date 2022/6/6 11:12
 */
@Mapper
public interface TbOfferAttachmentMapstruct {
    TbOfferAttachmentMapstruct INSTANCE = Mappers.getMapper(TbOfferAttachmentMapstruct.class);

    /**
     * 实体类列表转成VO列表
     * @param attachments
     * @return
     */
    List<TbOfferAttachmentVO> entityList2VOList(List<TbOfferAttachment> attachments);

    /**
     * AttachmentFileInfo列表转成实体类列表
     * @param fileInfos
     * @return
     */
    List<TbOfferAttachment> dtoList2EntityList(List<AttachmentFileInfo> fileInfos);
}
